package work7;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Random;
import java.util.Scanner;

public class t1 {

    public static void main(String[] args) {
        int year,month,day;
        Scanner scanner = new Scanner(System.in);
        System.out.println("输入一个日期：");
        year = scanner.nextInt();
        month = scanner.nextInt();
        day = scanner.nextInt();
        Calendar cd = Calendar.getInstance();
        cd.set(year,month -1,day);
        DateFormat sf = DateFormat.getDateTimeInstance(DateFormat.SHORT,DateFormat.SHORT);
        DateFormat mf = DateFormat.getDateTimeInstance(DateFormat.MEDIUM,DateFormat.MEDIUM);
        DateFormat lf = DateFormat.getDateTimeInstance(DateFormat.LONG,DateFormat.LONG);
        DateFormat ff = DateFormat.getDateTimeInstance(DateFormat.FULL,DateFormat.FULL);

        SimpleDateFormat sdf = new SimpleDateFormat("北京时间：yyyy年MM月dd日 EEEE HH点mm分ss秒");
        System.out.println(cd.getTime());
        System.out.println(sf.format(cd.getTime()));
        System.out.println(mf.format(cd.getTime()));
        System.out.println(lf.format(cd.getTime()));
        System.out.println(ff.format(cd.getTime()));
        System.out.println(sdf.format(new Date()));

        System.out.println("\n0501刘冰");
    }
}
